package com.qfedu.edu.aclservice.controller;


import com.qfedu.edu.aclservice.feign.VipService;
import com.qfedu.edu.aclservice.service.UserService;
import com.qfedu.edu.po.User;
import com.qfedu.edu.po.Vip;
import com.qfedu.edu.result.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaobobo
 * @since 2024-11-05
 */
@RestController
@RequestMapping("/aclservice/user")
public class UserController {

    @Autowired
    private UserService userService;

    @Autowired
    private VipService vipService;


    @GetMapping("/list")
    public R list(){
        List<User> list = userService.list(null);
        return R.ok().data("list",list);
    }

    /**
     * 这个是测试Token的级联传输问题
     * @return
     */
    @GetMapping("/listVip")
    public R listVip(){
        R r=vipService.list();
        return r;
    }

}

